import { Component, OnInit, OnDestroy, DoCheck, Output, Input, EventEmitter } from '@angular/core';

@Component({
  selector: 'app-ckeckperson',
  templateUrl: './ckeckperson.component.html',
  styleUrls: ['./ckeckperson.component.scss'],
})
export class CkeckpersonComponent implements OnInit {
  @Output() provinceOut = new EventEmitter();//输出参数
  multiple1 = false;
  multiple2 = false;
  multiple3 = false;
  constructor() {

    this.data1 = [];
    this.data2 = [];
    this.data3 = [];
  }
  data: persondata[];

  data1: persondata[];
  data2: persondata[];
  data3: persondata[];
  type = 1;
  /**
  * 生命周期初始化钩子(生命周期尽量按执行顺序来写，养成好习惯)
  */
  ngOnInit(): void {
    this.getCityArea(3);
    if (this.data.length > 0) {
      this.type = 1;
      while (this.data.length === 1) {
        if (this.data[0].children !== null) {
          this.data = this.data[0].children;
        } else {
          break;
        }
      }
      if (this.data[0].children != null) {
        this.type = 2;
        if (this.data[0].children[0].children != null) {
          this.type = 3;
          this.multiple3 = true;
        } else {
          this.multiple2 = true;

        }
      } else {
        this.multiple1 = true;
      }
      //最终只有一个选择框  并且只有一条待选数据  默认选中
      if (this.type === 1 && this.data.length === 1) {
        this.data1 = this.data;
      }
    }
  }
  /** 获取数据 */
  getCityArea(str) {
    this.data = [{ "id": "7", "parentId": "2", "name": "办公室", "children": [{ "id": "111_2", "parentId": "7", "name": "管理员", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false },];

    if (str === 1) {
      this.data = [{ "id": "7", "parentId": "2", "name": "办公室", "children": [{ "id": "111_2", "parentId": "7", "name": "管理员", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_04a36741-89a3-454f-9c96-b261b2f0345e", "parentId": "7", "name": "褚福建", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_853cb2a5-8f09-44a4-97be-c61e738513cc", "parentId": "7", "name": "蒙永辉", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d2aa5de9-f65d-425d-856a-9f505302dda4", "parentId": "7", "name": "张志国", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_07b26219-78dd-42c9-8022-b2e82461128a", "parentId": "7", "name": "李笑泉", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_b2b0ef13-8373-496f-91bd-ac74189ce913", "parentId": "7", "name": "李清海", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_c689dd08-ff3c-4def-b343-3dce9c5e0354", "parentId": "7", "name": "何伟东", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_f10b2a28-018f-4ae5-9828-5e2c6ac0becf", "parentId": "7", "name": "毛娟", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_80f96eb8-7edf-4f90-9a43-4f9bda8609b3", "parentId": "7", "name": "高赞东", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_af0735ea-e821-4108-beb0-7b8515e5f570", "parentId": "7", "name": "江志辉", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_2b6291fa-5c38-4cb7-8eb6-280f73be18c0", "parentId": "7", "name": "王福志", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_270d4e42-0873-41bf-87f2-8292f6b7a885", "parentId": "7", "name": "曹春山", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d80e9e28-b1dc-4332-99e9-a6d0b19415ca", "parentId": "7", "name": "梁浩", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_18d45df3-ab96-4e30-86c7-fabec163b702", "parentId": "7", "name": "赵西涛", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_b82d3915-bd7d-4d77-97d9-2052964f3389", "parentId": "7", "name": "朱彦波", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_5d84f761-9c37-4085-ab06-9c83edc4407d", "parentId": "7", "name": "尹智强", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_b38e2056-201d-42ed-9aa6-07a1da5a71b8", "parentId": "7", "name": "王宗香", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }]
    } else if (str === 2) {




      this.data = [{ "id": "2", "parentId": "0", "name": "山东地质环境监测总站", "children": [{ "id": "7", "parentId": "2", "name": "办公室", "children": [{ "id": "111_2", "parentId": "7", "name": "管理员", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_04a36741-89a3-454f-9c96-b261b2f0345e", "parentId": "7", "name": "褚福建", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_853cb2a5-8f09-44a4-97be-c61e738513cc", "parentId": "7", "name": "蒙永辉", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d2aa5de9-f65d-425d-856a-9f505302dda4", "parentId": "7", "name": "张志国", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_07b26219-78dd-42c9-8022-b2e82461128a", "parentId": "7", "name": "李笑泉", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_b2b0ef13-8373-496f-91bd-ac74189ce913", "parentId": "7", "name": "李清海", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_c689dd08-ff3c-4def-b343-3dce9c5e0354", "parentId": "7", "name": "何伟东", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_f10b2a28-018f-4ae5-9828-5e2c6ac0becf", "parentId": "7", "name": "毛娟", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_80f96eb8-7edf-4f90-9a43-4f9bda8609b3", "parentId": "7", "name": "高赞东", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_af0735ea-e821-4108-beb0-7b8515e5f570", "parentId": "7", "name": "江志辉", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_2b6291fa-5c38-4cb7-8eb6-280f73be18c0", "parentId": "7", "name": "王福志", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_270d4e42-0873-41bf-87f2-8292f6b7a885", "parentId": "7", "name": "曹春山", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d80e9e28-b1dc-4332-99e9-a6d0b19415ca", "parentId": "7", "name": "梁浩", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_18d45df3-ab96-4e30-86c7-fabec163b702", "parentId": "7", "name": "赵西涛", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_b82d3915-bd7d-4d77-97d9-2052964f3389", "parentId": "7", "name": "朱彦波", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_5d84f761-9c37-4085-ab06-9c83edc4407d", "parentId": "7", "name": "尹智强", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_b38e2056-201d-42ed-9aa6-07a1da5a71b8", "parentId": "7", "name": "王宗香", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "25", "parentId": "2", "name": "总工程师", "children": [{ "id": "111_42653532-86b0-4723-8795-f3c58335bc82", "parentId": "25", "name": "冯克印", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "6", "parentId": "2", "name": "站领导", "children": [{ "id": "111_4faccfd3-ed6a-42cf-add9-92887c2ee6ed", "parentId": "6", "name": "回寒星", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_04a36741-89a3-454f-9c96-b261b2f0345e", "parentId": "6", "name": "褚福建", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_c02745a7-79ff-427c-a013-fc731cca1be1", "parentId": "6", "name": "胡玉禄", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_b3156dc0-a842-4ded-8112-1239a6bf37b1", "parentId": "6", "name": "常允新", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_8791e598-c0b4-4d70-838a-1652f51919da", "parentId": "6", "name": "姚春梅", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_989d3807-7e06-42a1-82ea-dda8de75f20f", "parentId": "6", "name": "王林", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_853cb2a5-8f09-44a4-97be-c61e738513cc", "parentId": "6", "name": "蒙永辉", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "13", "parentId": "2", "name": "地质灾害调查防治室", "children": [{ "id": "111_c02745a7-79ff-427c-a013-fc731cca1be1", "parentId": "13", "name": "胡玉禄", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d485df2e-9e4c-41d0-bf54-93b518ecb016", "parentId": "13", "name": "董强", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_204d97d4-7f8c-4220-b04e-b7511aed1c79", "parentId": "13", "name": "王振涛", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_f6751bdb-683c-4b07-bea8-12a2d5e6c244", "parentId": "13", "name": "吕兰颂", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_2ff4b23c-8269-487d-bb72-7bb859a90baf", "parentId": "13", "name": "靳丰山", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_afbf3078-95a5-4b05-abfb-a0c6b13a2175", "parentId": "13", "name": "于德杰", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_4925889f-4395-4423-ba12-0dca9402faad", "parentId": "13", "name": "高峰", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_cfe1a338-18e5-4ad6-8c4f-bb096581b286", "parentId": "13", "name": "于其新", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_f8e7203a-91a2-4fcd-b08d-0fe5f9bd26e3", "parentId": "13", "name": "王平", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_dbc880eb-1f65-4446-9225-032757673f46", "parentId": "13", "name": "张丽霞", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_a86541a8-7f1e-4f48-bda5-73e3729777a3", "parentId": "13", "name": "于世忠", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "20", "parentId": "2", "name": "济南地质环境监测站", "children": [{ "id": "111_b3156dc0-a842-4ded-8112-1239a6bf37b1", "parentId": "20", "name": "常允新", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_3abd7d6d-149d-42ca-9490-cffcbb4ddf19", "parentId": "20", "name": "王庆兵", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d62ed7ec-fe2d-4cff-ace2-cfb26312e4bb", "parentId": "20", "name": "董玉龙", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_6a518080-872a-4f33-a9e1-273be0d5bb8b", "parentId": "20", "name": "孟凡奇", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_a92acc89-b826-4017-81ca-330bfec295f3", "parentId": "20", "name": "陈清芳", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d51ea143-90aa-4d0e-9172-8a6722b8042b", "parentId": "20", "name": "杨全城", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_872ffee4-bc84-478f-a673-37b79b048ee4", "parentId": "20", "name": "祁娟", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_081f2a91-3e1b-4b18-ac31-71260abd6dd6", "parentId": "20", "name": "吴丽莉", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "8", "parentId": "2", "name": "人事科", "children": [{ "id": "111_04a36741-89a3-454f-9c96-b261b2f0345e", "parentId": "8", "name": "褚福建", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_476c6f31-484c-4c2e-b0ce-880dcf2ff781", "parentId": "8", "name": "杨晓娟", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_532396c3-a747-4369-8060-e8f18776b2c5", "parentId": "8", "name": "袁斌", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_cb34f001-395d-49a4-be27-035dcc75e712", "parentId": "8", "name": "赵琳", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_e8b46ee0-8c15-43a1-a8a8-ba03c51e2bb3", "parentId": "8", "name": "徐蔷", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "18", "parentId": "2", "name": "地质灾害监测预警室", "children": [{ "id": "111_c02745a7-79ff-427c-a013-fc731cca1be1", "parentId": "18", "name": "胡玉禄", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_a426b61e-3b7f-4d89-8a57-4998530f6bf8", "parentId": "18", "name": "魏嘉", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_dc367264-9f6c-45d8-a878-1f7f4e52de36", "parentId": "18", "name": "张晔", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_f5ff3f63-2265-4eda-84ec-09bf5612a0f2", "parentId": "18", "name": "沙令宝", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "17", "parentId": "2", "name": "实验测试中心", "children": [{ "id": "111_b3156dc0-a842-4ded-8112-1239a6bf37b1", "parentId": "17", "name": "常允新", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_013e999e-f00a-48d4-abdc-4e765fdeaff8", "parentId": "17", "name": "王元波", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_ddf2d94d-2fd4-498f-974b-45c81bc96282", "parentId": "17", "name": "高平", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_2483e2d0-e61c-4c00-b789-dbc30486db8b", "parentId": "17", "name": "李延辉", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_efa19c0e-a97e-468c-9a4f-295441473a98", "parentId": "17", "name": "魏茂杰", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_4d661e4c-b922-4466-acf0-4e0bcdf5e563", "parentId": "17", "name": "郑小纯", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_2da6934a-0e3a-424c-8032-2df1ec15c803", "parentId": "17", "name": "张玉燕", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_54eee6a0-508e-4cfe-a9f3-109375d59cf9", "parentId": "17", "name": "岳双彦", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d00cf634-193e-4cf4-ac97-24c8853da61d", "parentId": "17", "name": "曹世欣", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_86961a3c-fce7-4278-a23b-0c67dc5e7159", "parentId": "17", "name": "刘红梅", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "16", "parentId": "2", "name": "网络信息室", "children": [{ "id": "111_b3156dc0-a842-4ded-8112-1239a6bf37b1", "parentId": "16", "name": "常允新", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_4e27df09-7502-423c-bd7c-e1b45e0d02be", "parentId": "16", "name": "郑庭明", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_b4b58c1d-7512-469c-8ac5-b4424ccbdc26", "parentId": "16", "name": "郑秀荣", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_fcaaaa31-b7f7-41ea-b28d-f0f29f6c3044", "parentId": "16", "name": "李佳韵", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_e461198f-ea5e-483e-898a-dd61363e5099", "parentId": "16", "name": "刘妍芬", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_66675d5e-fcdf-49a0-9ca5-26e743c41901", "parentId": "16", "name": "屈立云", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_2f272572-78db-4f5e-9391-55ecc8a8064d", "parentId": "16", "name": "胡红文", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_1c69eafc-b8d9-41a3-9038-1727b4ed6cd5", "parentId": "16", "name": "赵立桂", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "12", "parentId": "2", "name": "地下水调查监测室", "children": [{ "id": "111_b3156dc0-a842-4ded-8112-1239a6bf37b1", "parentId": "12", "name": "常允新", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_682a43d4-bc82-4f8c-a192-21be9f4be20c", "parentId": "12", "name": "宋和平", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_07d5618d-4c66-4e6a-a156-1084914a1f32", "parentId": "12", "name": "任翠爱", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_51b6ff87-86de-473c-8f39-9ac1e8c3b6af", "parentId": "12", "name": "齐孔让", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_f7b933e0-41af-4610-a7d3-e7d5fc108b30", "parentId": "12", "name": "颜井方", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_1c044f8a-3075-4bc2-bd31-5916689e19c6", "parentId": "12", "name": "王晓玮", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_3d13abfd-d021-4f95-b26b-96e766d707c2", "parentId": "12", "name": "王宁", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_f420e1c5-0ed6-4880-95d5-bc6be30967f6", "parentId": "12", "name": "陈盟", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_1b3a3cb9-25d5-45fa-b37a-afa5b0d7ad51", "parentId": "12", "name": "吴光伟", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_e636cac4-b2e4-4cc5-b992-a7f7d952e567", "parentId": "12", "name": "朱国", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_76d94dbe-a2c7-41d1-9488-d0ae48eb6cb7", "parentId": "12", "name": "周建民", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d80bf272-f3fc-4be2-a51e-3189f45d1536", "parentId": "12", "name": "赵利红", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_65777061-a719-4c7e-bc2b-68b22821618c", "parentId": "12", "name": "杨培杰", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_c7715eb3-31ee-4581-8222-add0270e7f2d", "parentId": "12", "name": "林明", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "21", "parentId": "2", "name": "淄博地质环境监测室", "children": [{ "id": "111_8791e598-c0b4-4d70-838a-1652f51919da", "parentId": "21", "name": "姚春梅", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_34a39f26-dadf-468b-be4a-eeaa12fc5c85", "parentId": "21", "name": "向玉青", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_65c1b823-a7b7-4e9f-addb-97db68684b1b", "parentId": "21", "name": "郭健", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_e95822e4-7759-4f8d-ab25-01e49339b4f0", "parentId": "21", "name": "高尚嵘", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d13ae3a8-6505-42ab-8500-d98201ae9b60", "parentId": "21", "name": "陈东", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_fb86edee-f1c7-4c9d-a774-83a1be747e9f", "parentId": "21", "name": "毛怀明", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "9", "parentId": "2", "name": "党群工作部", "children": [{ "id": "111_04a36741-89a3-454f-9c96-b261b2f0345e", "parentId": "9", "name": "褚福建", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_853cb2a5-8f09-44a4-97be-c61e738513cc", "parentId": "9", "name": "蒙永辉", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_7b68aa11-1b80-42fc-8778-9ab5e99f1369", "parentId": "9", "name": "黄岩岩", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_f81e8f3d-8f74-4215-a070-f98b70ce933f", "parentId": "9", "name": "李大勇", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_3a800f3f-5b8e-418c-a5d5-60beac378411", "parentId": "9", "name": "赵菲", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_c8d00702-a96d-476d-8cee-f1099d0ba3a4", "parentId": "9", "name": "李红霞", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_26e8b5cc-1a4c-4c4b-971d-5868737ac86b", "parentId": "9", "name": "赵洪武", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_c0bc7bf4-66ef-4ab4-b02b-06868d15fbd4", "parentId": "9", "name": "何国幸", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "15", "parentId": "2", "name": "矿山环境与国土整治评价室", "children": [{ "id": "111_8791e598-c0b4-4d70-838a-1652f51919da", "parentId": "15", "name": "姚春梅", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_05e5e0c5-260a-4bdc-9b39-ff1516fc7355", "parentId": "15", "name": "刘洪亮", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_e1e8446c-f519-466e-84d7-3d3d60544324", "parentId": "15", "name": "邹艳明", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_f8365e55-4481-43b3-a1c4-88f077c8737a", "parentId": "15", "name": "罗梅", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_b738de94-c0e7-4ce6-ada9-7a0e44269ca3", "parentId": "15", "name": "冯在敏", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_32410662-3079-4583-8793-4718c8fb833d", "parentId": "15", "name": "高志刚", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_703a3693-07e7-4d35-8e52-a562adfa661f", "parentId": "15", "name": "秦鹏", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "19", "parentId": "2", "name": "地质灾害应急处置室", "children": [{ "id": "111_c02745a7-79ff-427c-a013-fc731cca1be1", "parentId": "19", "name": "胡玉禄", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_03a6a3b9-011c-4b63-816a-4f25272fce1c", "parentId": "19", "name": "贺敬", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_087c5be9-09d3-4faa-a181-e7cc490a2f60", "parentId": "19", "name": "韩保栋", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_3aac745e-6c77-4f44-b31f-eee7e5084566", "parentId": "19", "name": "张永伟", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_0422cdbc-8cb1-430d-9042-54714f694656", "parentId": "19", "name": "韩瑶", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_794db0e1-5b5b-494e-8279-1a6bee5cd9ec", "parentId": "19", "name": "王心兵", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_6b5d2084-5ec8-469f-a752-e315080b8949", "parentId": "19", "name": "邵明", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "22", "parentId": "2", "name": "烟台地质环境监测室", "children": [{ "id": "111_c02745a7-79ff-427c-a013-fc731cca1be1", "parentId": "22", "name": "胡玉禄", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_ee011345-fb7b-4fd7-95f5-7fab2253b215", "parentId": "22", "name": "吕宝平", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_4b2bb4b5-b643-478a-9d12-96dd6fee8b5c", "parentId": "22", "name": "白艳慧", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_fecfade4-928f-4d8a-8005-0969db50e887", "parentId": "22", "name": "王经", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_a205ef84-82ec-4ec5-86ba-4d7cb4acfac0", "parentId": "22", "name": "杨冬铭", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "10", "parentId": "2", "name": "财务科", "children": [{ "id": "111_4faccfd3-ed6a-42cf-add9-92887c2ee6ed", "parentId": "10", "name": "回寒星", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_ce3aca03-9a15-44e0-97f6-c3ca476eb985", "parentId": "10", "name": "刘磊", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_08248cde-3853-4211-951f-c1308a71efef", "parentId": "10", "name": "游晓梅", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_30eea401-c6f2-465b-b833-0c02f019cd51", "parentId": "10", "name": "孙慧", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_a6c3728f-a3f0-4869-912c-458f228755a1", "parentId": "10", "name": "庄美秀", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_87eeabd1-d39b-48cc-bfd5-7ef9aef8af20", "parentId": "10", "name": "肖敏", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_969c0e16-ad67-4d81-803f-91109e5df4e6", "parentId": "10", "name": "滕颖", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "14", "parentId": "2", "name": "环境地质调查评价室", "children": [{ "id": "111_8791e598-c0b4-4d70-838a-1652f51919da", "parentId": "14", "name": "姚春梅", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_b9f717da-7c3b-4a3c-b195-54b5afafafcd", "parentId": "14", "name": "王集宁", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_644596d0-4add-4e03-8fcf-21afb5b60b50", "parentId": "14", "name": "姚英强", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_3068103f-363a-41c1-af35-b09c937e30d1", "parentId": "14", "name": "王兆林", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_55b33050-adc0-49fb-adf6-a28685884170", "parentId": "14", "name": "王小燕", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d83989fb-4aa0-4533-8762-71d1bb6ebbad", "parentId": "14", "name": "邹连庆", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_d74e2d97-0ba4-4f2f-8fc0-38e099950df5", "parentId": "14", "name": "付娟", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_8efbae2c-5229-40c1-b299-086dc572f7bc", "parentId": "14", "name": "刘瑞峰", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_c218c517-94ed-44e6-b02e-449e1f4e593d", "parentId": "14", "name": "刘建梅", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_891ba1cb-da91-4693-8fca-f8630df76982", "parentId": "14", "name": "商婷婷", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "11", "parentId": "2", "name": "综合研究室", "children": [{ "id": "111_8791e598-c0b4-4d70-838a-1652f51919da", "parentId": "11", "name": "姚春梅", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_42653532-86b0-4723-8795-f3c58335bc82", "parentId": "11", "name": "冯克印", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_90bcea3f-f89a-4619-b2ee-2b7f4d36ad30", "parentId": "11", "name": "刘善军", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_8d0e1f14-c151-461c-a67a-baf1299b0b3b", "parentId": "11", "name": "方庆海", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_7b93c60a-9c00-4904-88c9-e83a8e7d2db9", "parentId": "11", "name": "赵艳", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_5084a56f-92b0-44e3-8d5c-754c9ca1b3c0", "parentId": "11", "name": "邱希青", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_11542fbb-9a9d-459f-95d6-c3ce02f4783a", "parentId": "11", "name": "熊大军", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }, { "id": "845dac082ddc496aa96b2348d469e4ba", "parentId": "2", "name": "物业中心", "children": [{ "id": "111_7b3fa219-b8a2-4ecf-934a-af965ee89162", "parentId": "845dac082ddc496aa96b2348d469e4ba", "name": "李慧", "children": null, "image": null, "url": null, "checked": false }, { "id": "111_458e04af-e372-4947-97b2-2e4c662a6271", "parentId": "845dac082ddc496aa96b2348d469e4ba", "name": "陈翔", "children": null, "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }], "image": null, "url": null, "checked": false }]
    }
  }

  ngDoCheck(): void {//select 选择变化监听
    if (this.type === 3) {
      this.provinceOut.emit(this.data3);//返回值
    } else if (this.type === 2) {
      this.provinceOut.emit(this.data2);//返回值
    } else if (this.type === 1) {
      this.provinceOut.emit(this.data1);//返回值
    }
  }

}


// 市级实体类
export class persondata {

  children?: Array<persondata>;
  id: String;
  parentId: string;
  name: string;
  image: string;
  url: string;
  checked: boolean;
}
